-
Notifications
You must be signed in to change notification settings - Fork 49
[Fix #928] Adding config and secret manager #931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: fjtirado <ftirados@redhat.com>
| secretManager = | ||
| ServiceLoader.load(SecretManager.class) | ||
| .findFirst() | ||
| .orElseGet(() -> s -> configManager.config(s, String.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default secrets are properties!
| configManager = | ||
| ServiceLoader.load(ConfigManager.class) | ||
| .findFirst() | ||
| .orElseGet(() -> new SystemPropertyConfigManager()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default properties are java system properties
| String name, WorkflowAdditionalObject<T> additionalObject) { | ||
| if (additionalObjects == null) { | ||
| additionalObjects = new ConcurrentHashMap<>(); | ||
| additionalObjects = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but this can be a regular hashmap, since syncrhonization is not required for unvariant hashmap like this one once the application is built
| public record WorkflowError( | ||
| String type, int status, String instance, String title, String details) { | ||
|
|
||
| public static final Errors.Standard RUNTIME_TYPE = Errors.RUNTIME; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those two ones were never used. I was trying to avoid accesing Errors from runtime context, but at the end is kind of confusing
impl/test/src/test/java/io/serverlessworkflow/impl/test/SecretExpressionTest.java
Show resolved
Hide resolved
…ExpressionTest.java Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Fix #929 and #926